{% macro gen_table(users) %}
    <table id="user-info-table" class="table table-bordered table-hover table-condensed table-striped">
        <thead>
            <tr>
                <th>用户ID</th>
                <th>手机号</th>
                <th>昵称</th>
                <th>省份</th>
                <th>付费次数</th>
                <th>付费总额</th>
                <th>退单次数</th>
                <th>抢单次数</th>
                <th>最近抢单日期</th>
                <th>操作</th>
            </tr>
        </thead>
        <tbody>
            {% for user in users %}
            <tr>
                <td>{{ user['id'] }}</td>
                <td>{{ user['mobile'] | encrypt }}</td>
                <td>{{ user['nickname'] }}</td>
                <td>{{ user['prov'] }}</td>
                <td>{{ user['bill_count'] }}</td>
                <td>{{ user['bill_amt_total'] }}</td>
                <td>{{ user['feedback_count'] }}</td>
                <td>{{ user['partic_count'] }}</td>
                <td>{{ user['max_partic_at'] }}</td>
                <td>
                    <a
                      class="btn btn-xs btn-primary"
                      href="{{url_for('op_bp.user_info', user_id=user['id'])}}"
                      name="user-info"
                      target="_blank"
                    >编辑</a><br>
                    <a
                      class="btn btn-xs btn-info" style="margin: 3px;"
                      href="{{url_for('op_bp.user_bid_costs', user_id=user['id'])}}"
                      name="user-costs"
                      target="_blank"
                    >消费记录</a>
                </td>
            </tr>
            {% endfor %}
        </tbody>
    </table>
{% endmacro %}
